#pragma once

#include "includeBase.h"

class FileUtil
{
public:
    static void createDir(const QString& dirPath);

    static QString join(const QString& filePath);

    static QString readTextFile(const QString& path);

    static bool writeTextFile(const QString& path, const QString& content);

    static QString readBinFileToBase64(const QString& path);

    static QString writeBinFileFromBase64(
        const QString& path,
        const QString& content
    );

    static void readJsonFile(const QString& path, QJsonDocument& jsonDoc);

    static bool writeJsonFile(const QString& path, const QJsonObject& content);
};
